//this dofile produces comprehensive location info on agencies (i.e. ds/gn etc..)  

clear
set matsize 100
set more off 
# delimit;


* Set directory; 

cd "~/Desktop/migrec_replication/do/";


use ../dta_secure/agencies.dta, clear; 


rename agency_towncode towncode;


merge m:1 towncode using ../dta_secure/villages.dta, gen(agency_village_merge); 


keep if agency_village_merge == 3; 


rename towncode agency_towncode;


save ../dta_secure/agency_villages.dta, replace; 
